When encoding an image in a video sequence, the image is first divided into coding entities of pixels of equal size referred to as Coding Tree Block (CTB). The size of a Coding Tree Block is typically 64 by 64 pixels. Each Coding Tree Block may then be decomposed in a hierarchical tree of smaller blocks which size may vary and which are the actual blocks to encode. These smaller blocks to encode are referred to as Coding Unit (CU).
The encoding of a particular Coding Unit is typically predictive. This means that a predictor block is first determined. Next, the difference between the predictor block and the Coding Unit is calculated. This difference is called the residue. Next, this residue is compressed. The actual encoded information of the Coding Unit is made of some information to indicate the way of determining the predictor block and the compressed residue. Best predictor blocks are blocks as similar as possible to the Coding Unit in order to get a small residue that could be efficiently compressed.
Encoding may be lossy, meaning that information is lost in the encoding process. The decoded block of pixel is not exactly the same as the original Coding Unit. Typically the loss of information comes from a quantization applied to the residue before entropy coding. This quantization allows a higher compression rate at the price of the loss of accuracy. Typically, high frequencies, namely the high level of details, are removed in the block.
Encoding may be lossless, meaning that the residue is not quantized. This kind of encoding allows retrieving the exact copy of the original samples of the Coding Unit. The lossless encoding is obtained at the expense of compression rate which is much smaller compared to a lossy compression.
The coding mode is defined based on the method used to determine the predictor block for the predictive encoding method of a Coding Unit.
A first coding mode is referred to as INTRA mode. According to INTRA mode, the predictor block is built based on the value of pixels immediately surrounding the Coding Unit within the current image. It is worth noting that the predictor block is not a block of the current image but a construction. A direction is used to determine which pixels of the border are actually used to build the predictor block and how they are used. The idea behind INTRA mode is that, due to the general coherence of natural images, the pixels immediately surrounding the Coding Unit are likely to be similar to pixels of the current Coding Unit. Therefore, it is possible to get a good prediction of the value of pixels of the Coding Unit using a predictor block based on these surrounding pixels.
A second coding mode is referred to as INTER mode. According to INTER mode, the predictor block is a block of another image. The idea behind the INTER mode is that successive images in a sequence are generally very similar. The main difference comes typically from a motion between these images due to the scrolling of the camera or due to moving objects in the scene. The predictor block is determined by a vector giving its location in a reference image relatively to the location of the Coding Unit within the current image. This vector is referred to as a motion vector. According to this mode, the encoding of such Coding Unit using this mode comprises motion information comprising the motion vector and the compressed residue.
We focus in this document on a third coding mode called INTRA Block Copy mode. According to the INTRA Block Copy mode, the block predictor is an actual block of the current image. A block vector (BV) is used to locate the predictor block. This block vector gives the location in the current image of the predictor block relatively to the location of the Coding Unit in the same current image. It comes that this block vector shares some similarities with the motion vector of the INTER mode. It is sometime called motion vector by analogy. As there could not be a motion within an image, strictly speaking, and for the sake of clarity, in this document motion vector always refer to the INTER mode while block vector is used for the INTRA Block Copy mode.
The causal principle is the principle that states that all information to decode a particular Coding Unit must be based on already reconstructed Coding Units. At encoding, the whole information may be considered as available. Namely, to encode a given Coding Unit it would be possible to use any information from the entire current images or from all decoded and available other images in the sequence. At decoding, things are different. The decoding of the current images is typically done by decoding sequentially all Coding Unit. The order of decoding follows typically a raster scan order, namely beginning in the upper left of the image, progressing from left to right and from top to bottom. It come that when decoding a given Coding Unit, only the part of the current image located up or left to the current Coding Unit has already been decoded. This is the only available information for the decoding of the current Coding Unit. This has to be taken into account at encoding. For example, a predictor block in INTRA Block Copy mode, should pertain to the part of the image that will be available at decoding.
INTRA block copy is very similar to the INTER, MERGE or SKIP modes in that the encoder uses block matching to find the prediction block. This is unfortunately a computationally intensive task, and it is beneficial to take into account the block properties to design efficient search algorithms.
The present invention has been devised to address one or more of the foregoing concerns.